// CL_INIT OF THE CHATBOT

if CLIENT then

	ChatBotSettings = { };
	ChatBotSettings.Name = ".:CG:. Nick";
	ChatBotSettings.Color = Color( 0 , 0 , 255 , 255 );
	ChatBotSettings.Inter = " : ";
	ChatBotSettings.Delay = 0.5;
	ChatBotSettings.EasterEgg = "CupCakes are fun to eat";
	ChatBotSettings.EasterEggAnswer = "OMG !!! You just found my favorite phrase! Congrats!";
	ChatBotSettings.WierdDelay = 90;
	ChatBotSettings.File = "ChatBot.txt";
	ChatBotSettings.FileG = "ChatBot_G.txt";
	ChatBotSettings.FileAG = "ChatBot_AG.txt";

	ChatBotSettings.Adverts = { };
	ChatBotSettings.Adverts.Color = Color( 100,100,100 );
	ChatBotSettings.Adverts.Delay = 30;
	
	usermessage.Hook("ChatBot.Call", function( um )
	local _Message = um:ReadString()
		if _Message then
			timer.Simple( ChatBotSettings.Delay , function()
				chat.AddText(
					ChatBotSettings.Color , ChatBotSettings.Name ,
					Color(255,255,255), ChatBotSettings.Inter,
					Color(255,255,255), _Message)
				chat.PlaySound()
			end)
		end
	end)
		
	usermessage.Hook("ChatBot.Call.Advert", function( um )
		local _Message = um:ReadString()
		if _Message then
			timer.Simple( ChatBotSettings.Delay , function()
				chat.AddText(
					ChatBotSettings.Adverts.Color, "(ADVERT) ",
					ChatBotSettings.Color , ChatBotSettings.Name ,
					Color(255,255,255), ChatBotSettings.Inter,
					Color(255,255,255), _Message)
				chat.PlaySound()
			end)
		end
	end)
end